package com.yonyougov.devops.cruxcisupport.server;

import com.yonyougov.devops.cruxcisupport.util.CruxDevOpsIdGenerator;
import com.yonyougov.devops.fwc.core.entity.BasicEntity;
import com.yonyougov.devops.fwc.core.id.IdGenerator;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigInteger;

/***
 * t_server
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ServerEntity extends BasicEntity implements Serializable {

    /***
     * id
     */
    private BigInteger id;

    /***
     * name
     */
    private String name;

    /***
     * 内网ip
     */
    private String innerIp;

    /***
     * ip
     */
    private String ip;

    /***
     * port
     */
    private Integer port;

    /***
     * username
     */
    private String username;

    /***
     * password
     */
    private String password;

    /***
     * 1.ssh,2:password
     */
    private Integer connectType;

    /***
     * remark
     */
    private String remark;

    /***
     * state 1:正常 0:异常
     */
    private Integer state;

    /***
     * createUser 申请人
     */
    private BigInteger createUserId;

    //<!--用户自定义代码开始-->
    public IdGenerator idGenerator() {
        return new CruxDevOpsIdGenerator();
    }
    //<!--用户自定义代码结束-->
}
